/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package serveur;

/**
 *
 * @author MOI
 */

import Converters.NettyConverter;
import core.Emetteur;
import static org.jboss.netty.channel.Channels.*;

import org.jboss.netty.channel.ChannelPipeline;
import org.jboss.netty.channel.ChannelPipelineFactory;
import org.jboss.netty.channel.socket.ClientSocketChannelFactory;

/**
 * @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
 * @author Andy Taylor (andy.taylor@jboss.org)
 * @author <a href="http://gleamynode.net/">Trustin Lee</a>
 *
 * @version $Rev: 2080 $, $Date: 2010-01-26 18:04:19 +0900 (Tue, 26 Jan 2010) $
 */
public class ServeurPipelineFactory implements ChannelPipelineFactory {
   private NettyConverter Proxy;

    public ServeurPipelineFactory(NettyConverter p)
    {
        this.Proxy=p;
            
    }

    public ChannelPipeline getPipeline() throws Exception {
        ChannelPipeline p = pipeline(); // Note the static import.
        p.addLast("handler", new ServeurHandler(this.Proxy));
        return p;
    }
}